package ru.inse.realty.web.page;

import java.util.Map;

import ru.inse.realty.web.module.RealtyModule;
import ru.xeden.web.html.component.IComponent;
import ru.xeden.web.html.component.IComponentFactory;


public class RealtyComponentFactory
    implements IComponentFactory
{
    public static final String FACTORY_ID = "inse.realty.component.factory";
    private RealtyModule realtyModule;
    
    
    public RealtyComponentFactory(RealtyModule realtyModule)
    {
        this.realtyModule = realtyModule;
    }
    
    
    @Override
    public IComponent createComponent(String id, Map<String, String> atts)
    {
        if (ContentComponent.ID.equals(id))
        {
            return new ContentComponent(realtyModule);
        }
        return null;
    }
}
